package com.yz.service;

import com.yz.entity.Admin;
import com.yz.mapper.AdminMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/*@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:springssm.xml")*/
@Service
public class AdminService {
    @Autowired
    AdminMapper adminMapper;

//    @Test
    public List<Admin> getAllAdmin(){
        List<Admin> admins = adminMapper.selectAll();
        for (Admin admin:admins) {
            System.out.println(admin);
        }
        return admins;
    }
}
